A barcode is an optical machine-readable representation of data which is used for product and service identification, for inventory tracking, or to provide other information. Typical barcodes are linear or two dimensional images which are printed on a contrasting background. In the past, dedicated barcode readers were used to scan and decode the barcodes. As general purpose color cameras, particularly in mobile devices, become less expensive and more widely available, it can be both efficient and convenient to use these color cameras to image barcodes. The color imaging data can then be processed to decode the barcode. However, the color imaging sensors in the general purpose cameras are not specifically adapted to barcode imaging. For example, the general purpose cameras may not be stable, in focus, or provide ideal lighting. Additionally, some portions of the data generated by the general purpose color cameras may generate a significant amount of noise to the image but contribute very little useful information for decoding the barcode.